package cn.edu.cdu.group4nb.mapper;

import cn.edu.cdu.group4nb.po.RoleInf;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @auther: tupeng
 * @date: 2019-10-09 16:06
 */

public interface RoleMapper {

    void addRole(@Param("rolename") String rolename,
                 @Param("roledetail") String roledetail);
    void deleteRole(int[] roleid);
    List<RoleInf> queryAllRole();
    RoleInf queryRoleById(int roleid);
    void updateRole(@Param("rolename") String rolename,
                    @Param("roledetail") String roledetail,
                    @Param("roleid") String roleid);

    List<RoleInf> getRoleById(int user_info_id);
    void addRoleToUser(RoleInf roleInf);

    RoleInf queryRoleByUserId(int user_info_id);

    void deleteRoleFromUser(int[] roleid);
}
